<?php
/**
 * File: cmscolumns.php.
 * Author: caoqicheng@haibao.com
 * Editor: PhpStorm
 * Date: 17/2/7 上午10:45
 * Brief:
 */
namespace haibao\jiepai\model\data\columns;

class CmsColumns extends \haibao\jiepai\model\data\Base{
	
	/**
	 * 上级栏目ID,默认为0，表示为1级栏目
	 */
	const TOP_COLUMN_ONE = 0 ;
	const TOP_COLUMN_TWO = 1 ;
	
	/**
	 * 栏目类型 1->标准栏目，2->标签栏目，3->专栏
	 */
	const TYPE_COLUMN_NORMAL = 1 ;
	const TYPE_COLUMN_TAG = 2 ;
	const TYPE_COLUMN_SPECIAL = 3 ;
	
	/**
	 * 是否可以订阅（0不可以，1可以）
	 */
	const STATUS_DISABLE = 0 ;
	const STATUS_ENABLE = 1 ;
	
	const FLAG_ENABLE = 0;
	const FLAG_DEL = -1;
	
	public $TopColumnID;

	public $Description;
	
	public $ColumnName;
	
	public $ColumnNameFr;
	
	public $UpdateDate;

	public $Tags;
	
	public $TagsJson;
	
	public $TagID;
	
	public $ColumnType;
	
	public $PictureID;
	
	public $TitlePictureID;
	
	public $CreatorID;
	
	public $Flag;
	
	public $Status;
	
	public $ShowIndex;
	
	public $CreateTime;
	
	/**
	 *栏目类型名称 
	 */
	public $ColumnTypeName;
	
	public $TagName;
	
	public $tagsJsonData;
	
	public $CreatorName;

	public $QuickComment;

	public function __construct(){
		parent::__construct();
		$this->setColumnName('Id', 'ColumnID');
		
		$this->intField('TopColumnID', 'TopColumnID',true);
		$this->stringField('Description', 'Description');
		$this->stringField('ColumnName', 'ColumnName');
		$this->stringField('ColumnNameFr', 'ColumnNameFr');
		$this->stringField('UpdateDate', 'UpdateDate');
		$this->stringField('Tags', 'Tags');
		$this->stringField('TagsJson', 'TagsJson');
		
		$this->intField('TagID', 'TagID');
		$this->intField('ColumnType', 'ColumnType');
		$this->intField('PictureID', 'PictureID');
		$this->intField('TitlePictureID', 'TitlePictureID');
		$this->intField('CreatorID', 'CreatorID');
		$this->intField('Flag', 'Flag',true);
		$this->intField('Status', 'Status');
		$this->intField('ShowIndex', 'ShowIndex');
		$this->dateField('CreateTime', 'CreateTime',true);
		$this->dateField('QuickComment', 'QuickComment');

		$this->setTableName('cms_columns');
	}
}